package com.marvels.common.constants;

/**
 * 
* @ClassName: PayContants 
* @Description: 支付相关枚举 
* @author 李瑶
* @date 2018年10月10日 下午3:32:29 
*
 */
public enum PayContants {

	/**
	 * 代扣渠道易宝
	 */
	PAY_CHANNEL_YB("yb", "代付渠道-易宝"),
	PAY_CHANNEL_HJ("hj", "代付渠道-汇聚"),
	PAY_CHANNEL_BF("bf", "代付渠道-宝付"),
	PAY_CHANNEL_KQ("kq", "代付渠道-快钱"),
	PAY_CHANNEL_CJ("cj", "代付渠道-畅捷"),
	PAY_CHANNEL_HLB("hlb", "代付渠道-合利宝"),
	PAY_CHANNEL_YZF("yzf", "代付渠道-翼/易支付"),
	YB_BINDED_CARD_CODE("-10000001", "用户已经成功绑卡"),
	PAY_NO_PRE_BIND("-10000002", "尚未进行预绑卡或者预绑卡失败"),
	PAY_REQUEST_ERROR("-10000003", "代发请求异常");

	private String code;

	private String message;

	private PayContants(String code, String message) {
		this.code = code;
		this.message = message;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public static PayContants getPayEnumByCode(String code){
		for(PayContants sexEnum : PayContants.values()){
			if(code.equals(sexEnum.getCode())){
				return sexEnum;
			}
		}
		return null;
	}
	
}
